package com.ss.android.article.base.feature.subscribe.b;

import com.ss.android.article.base.feature.app.b.DBHelper;
import com.ss.android.article.base.feature.subscribe.model.EntryItem;
import com.ss.android.common.AbsApiThread;
import com.ss.android.common.util.NetworkUtils;

final class g extends AbsApiThread {
    private final e b;
    private final long a;

    g(e arg1, long arg2) {
        this.b = arg1;
        this.a = arg2;

    }

    public final void run() {
        try {
            if(!NetworkUtils.isNetworkAvailable(this.b.c)) {
                return;
            }

            EntryItem v0_1 = android.support.design.a.d(this.a);
            if(v0_1 == null) {
                return;
            }

            DBHelper.getInstance(this.b.c).a(v0_1, v0_1.isSubscribed());
            this.b.a.obtainMessage(5, v0_1).sendToTarget();
        }
        catch(Exception v0) {
        }
    }
}

